#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int arr[3] = { 2,3,7 };
    int i = 0;
    int count = 0;
    while (i < 3)
    {
        if (n % arr[i] == 0)
        {
            printf("%d ", arr[i]);
            count++;
        }
        i++;
    }
    if (!count)
        printf("n");

    return 0;
}